package by.dezhits.liltweets.task;

import org.json.JSONObject;

public class JsonObjectTask extends CommonAsyncTask<JSONObject> {

	public JsonObjectTask(ParamCallback<JSONObject> paramCallback, int type) {
		super(paramCallback, type);
	}

	@Override
	public JSONObject convert(String source) throws Exception {
		if (source == null || source.length() == 0) {
			return null;
		}
		return new JSONObject(source);
	}

}
